home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Enlighten DSM 3.1
/
SGI EnlightenDSM 3.1.iso
/
SCO5X
/
INSTALL
/
bin
/
show_enl_daemons
< prev
next >
Wrap
Text File
|
1999-04-16
|
1KB
|
64 lines
#!/bin/sh
#
# Script: show_enl_daemons
#
# show_enl_daemons shows Enlighten daemons that are running and their PIDs.
# (md, pep, renld, and Events)
#
# Copyright (c) 1990-1999 Enlighten Software Solutions, Inc.
# All Rights Reserved.
#
# (ksh was used to bypass a variable bug in SCO3's sh. This script
# is /bin/sh compatible.)
#
SHUTDOWN_SECS=10
PATH=/bin:/usr/bin:/etc:/usr/ucb:/usr/bsd:/usr/etc:$PATH
export PATH
appName=`basename $0`
errorCheck () {
if [ $? -ne 0 ] ; then
echo "$appName: Fatal: Could not stop Enlighten daemons." 1>&2
exit 1
fi
}
OS=`uname -s`
REV=`uname -r`
#
# Deal with bsd ps
#
OPTS="-e"
PIDCOLUMN=1
if [ "$OS" = "SunOS" ]; then
case "$REV" in
4.1.* )
OPTS="-gxww"
PIDCOLUMN=1
;;
esac
fi
PIDS=`ps $OPTS | egrep -e 'emdd|pep|AgentMon|AgentENL|emdd|renld' | grep -v egrep`
if [ -z "$PIDS" ] ; then
echo
echo "No Enlighten daemons are running."
echo
else
echo
echo "The following Enlighten daemons are running:"
echo
ps $OPTS | grep PID | grep -v grep
echo "$PIDS"
echo
fi
exit 0